package professor;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintStream;

public class Cleaner {
	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new FileReader(new File(
				"resources/pt_BR.dic")));
		PrintStream p = new PrintStream(new File("resources/dic2.txt"));

		while (true) {
			String line = bf.readLine();
			if (line == null) {
				break;
			}
			line = line.trim();
			int i = line.indexOf("/");
			if (i == -1)
				i = line.length();
			String add = line.substring(0, i);
			p.append(add + "\n");
			System.out.println("LINE: <" + line + ">");
			System.out.println("ADD: <" + add + ">");
		}
		bf.close();
		p.flush();
		p.close();
	}
}
